<template>
  <Layout>
    <template #header>
      <Header />
    </template>

    <template #main>
      <div class="main-container">
        <RouterView />
      </div>
    </template>
  </Layout>
</template>

<script setup lang="ts">
import Layout from "@/components/Layout/index.vue";
import Header from "@/components/Header/index.vue";
import { useUserStore } from "./stores/user";
import { getToken } from "./utils/auth";

// 恢复登录状态
const { getUserInfo } = useUserStore();
if (getToken()) {
  getUserInfo();
}
</script>

